#ifndef TITLETEXT_H
#define TITLETEXT_H

#include <QGraphicsTextItem>
#include <QGraphicsScene>
#include <QApplication>
#include <QFont>
#include <QFontInfo>
#include <qdebug.h>
#include "audioplayerbackend.h"


//SHOULD WE SWITCH TO QTEXTLAYOUT ?

class titleText : public QGraphicsTextItem
{
    Q_OBJECT
public:
    titleText(AudioPlayerBackend * music, QColor color, int fontsize);
    void setArtist(QString artist);
    QString getArtist();
    void setAlbum(QString album);
    QString getAlbum();
    void setTitle(QString title);
    QString getTitle();
    void reload();
    void reset();

public slots:
    void updateCurrentTitle();

private:
    void mousePressEvent(QGraphicsSceneMouseEvent * event);
    QString artist;
    QString album;
    QString title;
    AudioPlayerBackend * music;

signals:
    void textChanged();
    void titleClicked();
};

#endif // TITLETEXT_H
